<?php include 'application/views/header.php' ?>
<h4 class="page-title">Hình ảnh</h4>
<div class="flash-message"><?php echo isset($message_error) ?  $message_error : ''  ?></div>
<form accept="<?php echo base_url() ?>picture/add" method="post" id="frmAddPicture"
    enctype="multipart/form-data">
    <table width="100%" class="form picture-add">
       <tr>
            <th>Tên hình ảnh</th>
            <td><input type="text" value="<?php echo (isset($Picture['PictureName']) ? $Picture['PictureName'] : '') ?>" name="PictureName" id="PictureName"/></td>
       </tr>
       <tr>
            <th>Tiêu đề hình ảnh</th>
            <td>                
                <textarea name="PictureTitle" id="PictureTitle"><?php echo isset($Picture['PictureTitle']) ? $Picture['PictureTitle'] : '' ?></textarea>
            </td>
       </tr>
       <tr>
            <th>Hình ảnh</th>
            <td>Hình ảnh chuẩn với 205px × 140px<br />
            <input type="file" name="Image" id="Image" /></td>
       </tr>
        <tr>
            <th>Ẩn hiện hình ảnh</th>
            <td>
                
                <input <?php echo (isset($Picture['Visible']) && $Picture['Visible'] == 1 ? 'checked="checked"' : '') ?>" type="checkbox" value="1" name="Visible" id="Visible"  />
            </td>
       </tr>
    </table>
    <div class="clr button-set">
        <input type="submit" value="Lưu nội dung" id="btnSave" />
        <input type="reset" value="Hủy nội dung vừa nhập" id="btnReset" />
        <input type="button" value="Về danh sách hình ảnh" id="btnBack" />
    </div>
</form>
<?php include 'application/views/footer.php' ?>
<script>
$('#btnBack').click(function(){
    window.location.href = '<?php echo base_url() ?>picture.html'; 
});
</script>